package com.cy.aircompressor.api;

import com.cy.aircompressor.entity.sensor.Sensor;
import com.cy.aircompressor.entity.sensor.SensorStatisticsData;
import com.drug.lib.view.recycptr.bean.RowEntity;
import com.net.model.bean.BaseResponse;

import java.util.List;

import io.reactivex.Flowable;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface SensorApi {

    /**
     * @param pageNum
     * @param pageSize
     * @param compressorId       空压机id
     * @param powerStationId     电站id
     * @param compressorPartCode 空压机部位code
     * @param sn                 编号
     * @param type               传感器类型
     * @return
     */

    @GET("sensor/queryPage")
    Flowable<BaseResponse<RowEntity<Sensor>>> querySensorByPage(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize,
                                                                @Query("compressorId") String compressorId, @Query("powerStationId") String powerStationId,
                                                                @Query("compressorPartCode") String compressorPartCode, @Query("sn") String sn, @Query("type") Integer type);

    /**
     * 查询传感器统计数据
     *
     * @param startTime
     * @param endTime
     * @param sortOrder
     * @param sn
     * @param type
     * @return
     */
    @GET("sensorDataAgg/querySensorData")
    Flowable<BaseResponse<List<SensorStatisticsData>>> querySensorStatisticsData(@Query("startTime") String startTime, @Query("endTime") String endTime,
                                                                                 @Query("sortOrder") String sortOrder, @Query("sn") String sn, @Query("type") Integer type);



}
